package club.cearnach.api.service;

import club.cearnach.entity.UserRate;
import club.cearnach.entity.UserMovieId;
import club.cearnach.api.exception.UserRateException;
import club.cearnach.api.form.PageBean;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * @author 阮胜
 * @date 2018/5/31 21:23
 */
public interface IUserRateService {
    Page<UserRate> findAll(Pageable pageable);

    UserRate save(UserRate comment);

    void delete(UserMovieId id) throws UserRateException;

    Page<UserRate> findAllOrderByCreateDate(PageBean pageBean);


    Page<UserRate> findByMovieId(Integer blogId, PageBean pageBean);

    Page<UserRate> findByUserId(Integer movieId, PageBean pageBean);

    UserRate findByUserIdAndMovieId(Integer userId, Integer movieId) throws UserRateException;


    void deleteIn(UserMovieId[] idArr);

    long count();

}
